package com.lgqz.topsports.bean;


import android.databinding.ObservableInt;
import android.support.v4.view.PagerAdapter;

import com.google.gson.annotations.Expose;
import com.lgqz.topsports.BR;
import com.lgqz.topsports.R;
import com.lgqz.topsports.adapter.CommentPagerAdapter;

import java.util.List;


/**
 * Description:
 * Copyright(c) 2016,邱国兴
 * This Program is protected by copyright laws
 * Created by Little Monster on 2016/12/15.
 *
 * @author 邱国兴
 */
public class DataEntity {
    private int limit;
    private List<Top> tops;
    private List<Content> contents;
    private float head_version;
    private float data_version;
    private List<Banner> banners;
    private int notice_num;
    private int contest_ing_num;
    private List<ContestList> contest_list;
    @Expose(serialize = false, deserialize = false)
    private PagerAdapter adapter;

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public List<Top> getTops() {
        return tops;
    }

    public void setTops(List<Top> tops) {
        this.tops = tops;
    }

    public List<Content> getContents() {
        return contents;
    }

    public void setContents(List<Content> contents) {
        this.contents = contents;
    }

    public float getHead_version() {
        return head_version;
    }

    public void setHead_version(float head_version) {
        this.head_version = head_version;
    }

    public float getData_version() {
        return data_version;
    }

    public void setData_version(float data_version) {
        this.data_version = data_version;
    }

    public List<Banner> getBanners() {
        return banners;
    }

    public void setBanners(List<Banner> banners) {
        this.banners = banners;
    }

    public int getNotice_num() {
        return notice_num;
    }

    public void setNotice_num(int notice_num) {
        this.notice_num = notice_num;
    }

    public int getContest_ing_num() {
        return contest_ing_num;
    }

    public void setContest_ing_num(int contest_ing_num) {
        this.contest_ing_num = contest_ing_num;
    }

    public List<ContestList> getContest_list() {
        return contest_list;
    }

    public void setContest_list(List<ContestList> contest_list) {
        this.contest_list = contest_list;
    }


    public PagerAdapter getAdapter() {
        if (banners != null) {
            adapter = new CommentPagerAdapter<>(banners, R.layout.item_banner_image, BR.banner);
            return adapter;
        } else {
            return null;
        }
    }
    @Expose(serialize = false, deserialize = false)
    private ObservableInt currentPage = new ObservableInt(0);
    public ObservableInt getCurrentPage() {
        return currentPage;
    }
}
